home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (Latin America) Volume 1 #6 / CD-ROM Today 6 Latam.iso / referenc / evol / database.dxr / 00099_DoDisp.ls < prev    next >
Encoding:
Text File  |  1996-11-08  |  1.9 KB  |  58 lines

  1. on UpdateNarraList
  2.   global gSourceMem, gDisplayMem, gNarraList, gNarraNumList, wColor, gAutoBack
  3.   set lc to the number of lines in the text of member gSourceMem of castLib 2
  4.   set lpos to lc
  5.   repeat while (line lpos of the text of member gSourceMem of castLib 2 <> "**links**") and (lpos > 0)
  6.     set lpos to lpos - 1
  7.   end repeat
  8.   set gNarraList to []
  9.   set gNarraNumList to []
  10.   set newNar to 1
  11.   repeat with K = 1 to 4
  12.     puppetSprite(1 + K, 1)
  13.     set the memberNum of sprite (1 + K) to 71 + K
  14.   end repeat
  15.   if lpos then
  16.     repeat with J = lpos to lc
  17.       set currLine to line J of field member gSourceMem of castLib 2
  18.       set word1 to word 1 of currLine
  19.       set Num to value(word1)
  20.       set wc to the number of words in currLine
  21.       set ArticleName to word 2 to wc of currLine
  22.       if Num then
  23.         set onePair to [Num, ArticleName]
  24.         add(gNarraList, onePair)
  25.         add(gNarraNumList, Num)
  26.         set the memberNum of sprite (1 + Num) to 10 + Num
  27.         if newNar then
  28.           set newNar to 0
  29.           set the memberNum of sprite gCornerCh() to 60 + Num
  30.           set wColor to Num
  31.         end if
  32.         next repeat
  33.       end if
  34.       if word1 = "B" then
  35.         set gAutoBack to ArticleName
  36.       end if
  37.     end repeat
  38.   else
  39.   end if
  40.   DisplayNewArticle(lpos)
  41. end
  42.  
  43. on DisplayNewArticle lpos
  44.   global gSourceMem, gDisplayMem, gFontSize, gArtTitleMem
  45.   set lc to the number of lines in the text of member gSourceMem of castLib 2
  46.   set EmptyMem to 50
  47.   duplicate(member gSourceMem of castLib 2, EmptyMem)
  48.   set the textAlign of member EmptyMem to "left"
  49.   set the boxType of member EmptyMem to #fixed
  50.   set the rect of member EmptyMem to rect(0, 0, 230, 300)
  51.   set the textSize of member EmptyMem to gFontSize
  52.   duplicate(member EmptyMem, gDisplayMem)
  53.   if lpos then
  54.     delete line lpos to lc of field member gDisplayMem
  55.   end if
  56.   put the name of field member gDisplayMem into field member gArtTitleMem
  57. end
  58.